package com.easy.base.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.easy.core.dbHandle.entity.BaseEntity;


/**
 * 描述：组织结构
 * @package com.easy.base.model
 * @class Organization
 */
@Entity
@Table(name = "BASE_ORGANIZATION")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Organization extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue
	private @Column(name="ID")  		Long			id;
	private @Column(name="ORG_NAME") 	String 			name;			//名称
	private @Column(name="ORG_PARENT")	String 			parentCode;		//父编号
//	private Organization 	parent;			//父组织结构编号，根为ROOT
	private @Column(name="ORG_DESC") 	String 			desc;			//描述
	private @Column(name="ORG_LEVEL") 	Integer 		level;			//层级
	private @Column(name="ORG_TEL") 	String 			telphone;		//电话
	private @Column(name="ORG_FAX")		String 			fax;			//传真

//	private List<Organization> children = new ArrayList<Organization>();

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getParentCode() {
		return parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	public String getTelphone() {
		return telphone;
	}
	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

}
